require 'rss/1.0'
require 'rss/2.0'
require 'open-uri'

class SayController < ApplicationController
  def hello
    source = "http://mcyclestuff.com/category/the-box-by-mcycle-wod/feed/" # url or local file

      @content = "" # raw content of rss feed will be loaded here
      open(source) do |s| @content = s.read end
      @rss = RSS::Parser.parse(@content, true)
  end

  def goodbye
  	feed = Feedzirra::Feed.fetch_and_parse("http://mcyclestuff.com/category/the-box-by-mcycle-wod/feed/")
	   @entry = feed.entries[2]
     @img=URI.extract(@entry.content).first

  end
end
